using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._MosaicDataset
{
    /// <summary>
    /// <para>Color Balance Mosaic Dataset</para>
    /// <para>Makes transitions from one image to an adjoining image appear seamless.</para>
    /// <para>使从一个图像到相邻图像的过渡看起来无缝。</para>
    /// </summary>    
    [DisplayName("Color Balance Mosaic Dataset")]
    public class ColorBalanceMosaicDataset : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ColorBalanceMosaicDataset()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_mosaic_dataset">
        /// <para>Mosaic Dataset</para>
        /// <para>The mosaic dataset you want to color balance.</para>
        /// <para>要进行颜色平衡的镶嵌数据集。</para>
        /// </param>
        public ColorBalanceMosaicDataset(object _in_mosaic_dataset)
        {
            this._in_mosaic_dataset = _in_mosaic_dataset;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Color Balance Mosaic Dataset";

        public override string CallName => "management.ColorBalanceMosaicDataset";

        public override List<string> AcceptEnvironments => ["parallelProcessingFactor"];

        public override object[] ParameterInfo => [_in_mosaic_dataset, _balancing_method.GetGPValue(), _color_surface_type.GetGPValue(), _target_raster, _exclude_raster, _stretch_type.GetGPValue(), _gamma, _block_field, _out_mosaic_dataset];

        /// <summary>
        /// <para>Mosaic Dataset</para>
        /// <para>The mosaic dataset you want to color balance.</para>
        /// <para>要进行颜色平衡的镶嵌数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Mosaic Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_mosaic_dataset { get; set; }


        /// <summary>
        /// <para>Balance Method</para>
        /// <para><xdoc>
        ///   <para>The balancing algorithm to use.</para>
        ///   <bulletList>
        ///     <bullet_item>Dodging—Change each pixel's value toward a target color. With this technique, you must also choose the type of target color surface, which affects the target color. Dodging tends to give the best result in most cases.</bullet_item><para/>
        ///     <bullet_item>Histogram—Change each pixel's value according to its relationship with a target histogram. The target histogram can be derived from all of the rasters, or you can specify a raster. This technique works well when all of the rasters have a similar histogram.</bullet_item><para/>
        ///     <bullet_item>Standard deviation—Change each of the pixel's values according to its relationship with the histogram of the target raster, within one standard deviation. The standard deviation can be calculated from all of the rasters in the mosaic dataset, or you can specify a target raster. This technique works best when all of the rasters have normal distributions.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要使用的平衡算法。</para>
        ///   <bulletList>
        ///     <bullet_item>闪避 （Dophing） - 将每个像素的值更改为目标颜色。使用此技术时，还必须选择影响目标颜色的目标颜色表面的类型。在大多数情况下，躲避往往会产生最好的结果。</bullet_item><para/>
        ///     <bullet_item>直方图 - 根据每个像素与目标直方图的关系更改每个像素的值。目标直方图可以从所有栅格派生，也可以指定栅格。当所有栅格都具有相似的直方图时，此技术非常有效。</bullet_item><para/>
        ///     <bullet_item>标准差 - 在一个标准差内，根据像素与目标栅格直方图的关系更改每个像素值。可以根据镶嵌数据集中的所有栅格计算标准差，也可以指定目标栅格。当所有栅格都具有正态分布时，此技术效果最佳。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Balance Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _balancing_method_value _balancing_method { get; set; } = _balancing_method_value._DODGING;

        public enum _balancing_method_value
        {
            /// <summary>
            /// <para>Dodging</para>
            /// <para>Dodging—Change each pixel's value toward a target color. With this technique, you must also choose the type of target color surface, which affects the target color. Dodging tends to give the best result in most cases.</para>
            /// <para>闪避 （Dophing） - 将每个像素的值更改为目标颜色。使用此技术时，还必须选择影响目标颜色的目标颜色表面的类型。在大多数情况下，躲避往往会产生最好的结果。</para>
            /// </summary>
            [Description("Dodging")]
            [GPEnumValue("DODGING")]
            _DODGING,

            /// <summary>
            /// <para>Histogram</para>
            /// <para>Histogram—Change each pixel's value according to its relationship with a target histogram. The target histogram can be derived from all of the rasters, or you can specify a raster. This technique works well when all of the rasters have a similar histogram.</para>
            /// <para>直方图 - 根据每个像素与目标直方图的关系更改每个像素的值。目标直方图可以从所有栅格派生，也可以指定栅格。当所有栅格都具有相似的直方图时，此技术非常有效。</para>
            /// </summary>
            [Description("Histogram")]
            [GPEnumValue("HISTOGRAM")]
            _HISTOGRAM,

            /// <summary>
            /// <para>Standard deviation</para>
            /// <para>Standard deviation—Change each of the pixel's values according to its relationship with the histogram of the target raster, within one standard deviation. The standard deviation can be calculated from all of the rasters in the mosaic dataset, or you can specify a target raster. This technique works best when all of the rasters have normal distributions.</para>
            /// <para>标准差 - 在一个标准差内，根据像素与目标栅格直方图的关系更改每个像素值。可以根据镶嵌数据集中的所有栅格计算标准差，也可以指定目标栅格。当所有栅格都具有正态分布时，此技术效果最佳。</para>
            /// </summary>
            [Description("Standard deviation")]
            [GPEnumValue("STANDARD_DEVIATION")]
            _STANDARD_DEVIATION,

        }

        /// <summary>
        /// <para>Color Surface Type</para>
        /// <para><xdoc>
        ///   <para>When using the Dodging balance method, each pixel needs a target color, which is determined by the surface type.</para>
        ///   <bulletList>
        ///     <bullet_item>Single color—Use when there are only a small number of raster datasets and a few different types of ground objects. If there are too many raster datasets or too many types of ground surfaces, the output color may become blurred. All the pixels are altered toward a single color point—the average of all pixels.</bullet_item><para/>
        ///     <bullet_item>Color grid— Use when you have a large number of raster datasets, or areas with a large number of diverse ground objects. Pixels are altered toward multiple target colors, which are distributed across the mosaic dataset.</bullet_item><para/>
        ///     <bullet_item>First order— This technique tends to create a smoother color change and uses less storage in the auxiliary table, but it may take longer to process compared to the color grid surface. All pixels are altered toward many points obtained from the two-dimensional polynomial slanted plane.</bullet_item><para/>
        ///     <bullet_item>Second order— This technique tends to create a smoother color change and uses less storage in the auxiliary table, but it may take longer to process compared to the color grid surface. All input pixels are altered toward a set of multiple points obtained from the two-dimensional polynomial parabolic surface.</bullet_item><para/>
        ///     <bullet_item>Third order— This technique tends to create a smoother color change and uses less storage in the auxiliary table, but it may take longer to process compared to the color grid surface. All input pixels are altered toward multiple points obtained from the cubic surface.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>使用“躲避平衡”方法时，每个像素都需要一种目标颜色，该颜色由曲面类型决定。</para>
        ///   <bulletList>
        ///     <bullet_item>单色 - 当只有少量栅格数据集和几种不同类型的地面对象时使用。如果栅格数据集过多或地面表面类型过多，则输出颜色可能会变得模糊。所有像素都朝向一个颜色点（所有像素的平均值）改变。</bullet_item><para/>
        ///     <bullet_item>颜色格网 - 在拥有大量栅格数据集或具有大量不同地面对象的区域时使用。像素将更改为分布在镶嵌数据集中的多种目标颜色。</bullet_item><para/>
        ///     <bullet_item>一阶 — 此技术倾向于创建更平滑的颜色变化，并在辅助表中使用更少的存储空间，但与颜色网格表面相比，它可能需要更长的处理时间。所有像素都朝向从二维多项式倾斜平面获得的许多点改变。</bullet_item><para/>
        ///     <bullet_item>二阶 — 此技术倾向于创建更平滑的颜色变化，并在辅助表中使用更少的存储空间，但与颜色网格表面相比，它可能需要更长的处理时间。所有输入像素都朝向从二维多项式抛物线曲面获得的一组多个点。</bullet_item><para/>
        ///     <bullet_item>三阶 — 此技术倾向于创建更平滑的颜色变化，并在辅助表中使用更少的存储空间，但与颜色网格表面相比，它可能需要更长的处理时间。所有输入像素都朝向从立方曲面获得的多个点进行更改。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Color Surface Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _color_surface_type_value _color_surface_type { get; set; } = _color_surface_type_value._COLOR_GRID;

        public enum _color_surface_type_value
        {
            /// <summary>
            /// <para>Single color</para>
            /// <para>Single color—Use when there are only a small number of raster datasets and a few different types of ground objects. If there are too many raster datasets or too many types of ground surfaces, the output color may become blurred. All the pixels are altered toward a single color point—the average of all pixels.</para>
            /// <para>单色 - 当只有少量栅格数据集和几种不同类型的地面对象时使用。如果栅格数据集过多或地面表面类型过多，则输出颜色可能会变得模糊。所有像素都朝向一个颜色点（所有像素的平均值）改变。</para>
            /// </summary>
            [Description("Single color")]
            [GPEnumValue("SINGLE_COLOR")]
            _SINGLE_COLOR,

            /// <summary>
            /// <para>Color grid</para>
            /// <para>Color grid— Use when you have a large number of raster datasets, or areas with a large number of diverse ground objects. Pixels are altered toward multiple target colors, which are distributed across the mosaic dataset.</para>
            /// <para>颜色格网 - 在拥有大量栅格数据集或具有大量不同地面对象的区域时使用。像素将更改为分布在镶嵌数据集中的多种目标颜色。</para>
            /// </summary>
            [Description("Color grid")]
            [GPEnumValue("COLOR_GRID")]
            _COLOR_GRID,

            /// <summary>
            /// <para>First order</para>
            /// <para>First order— This technique tends to create a smoother color change and uses less storage in the auxiliary table, but it may take longer to process compared to the color grid surface. All pixels are altered toward many points obtained from the two-dimensional polynomial slanted plane.</para>
            /// <para>一阶 — 此技术倾向于创建更平滑的颜色变化，并在辅助表中使用更少的存储空间，但与颜色网格表面相比，它可能需要更长的处理时间。所有像素都朝向从二维多项式倾斜平面获得的许多点改变。</para>
            /// </summary>
            [Description("First order")]
            [GPEnumValue("FIRST_ORDER")]
            _FIRST_ORDER,

            /// <summary>
            /// <para>Second order</para>
            /// <para>Second order— This technique tends to create a smoother color change and uses less storage in the auxiliary table, but it may take longer to process compared to the color grid surface. All input pixels are altered toward a set of multiple points obtained from the two-dimensional polynomial parabolic surface.</para>
            /// <para>二阶 — 此技术倾向于创建更平滑的颜色变化，并在辅助表中使用更少的存储空间，但与颜色网格表面相比，它可能需要更长的处理时间。所有输入像素都朝向从二维多项式抛物线曲面获得的一组多个点。</para>
            /// </summary>
            [Description("Second order")]
            [GPEnumValue("SECOND_ORDER")]
            _SECOND_ORDER,

            /// <summary>
            /// <para>Third order</para>
            /// <para>Third order— This technique tends to create a smoother color change and uses less storage in the auxiliary table, but it may take longer to process compared to the color grid surface. All input pixels are altered toward multiple points obtained from the cubic surface.</para>
            /// <para>三阶 — 此技术倾向于创建更平滑的颜色变化，并在辅助表中使用更少的存储空间，但与颜色网格表面相比，它可能需要更长的处理时间。所有输入像素都朝向从立方曲面获得的多个点进行更改。</para>
            /// </summary>
            [Description("Third order")]
            [GPEnumValue("THIRD_ORDER")]
            _THIRD_ORDER,

        }

        /// <summary>
        /// <para>Target Raster</para>
        /// <para>The raster you want to use to color balance the other images. The balance method and color surface type, if applicable, will be derived from this image.</para>
        /// <para>要用于对其他图像进行颜色平衡的栅格。平衡方法和颜色表面类型（如果适用）将从此图像中派生。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _target_raster { get; set; } = null;


        /// <summary>
        /// <para>Exclude Area Raster</para>
        /// <para>Apply a mask before color balancing the mosaic dataset. Create the mask using the Generate Exclude Area tool.</para>
        /// <para>在对镶嵌数据集进行颜色平衡之前应用蒙版。使用“生成排除区域”工具创建蒙版。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Exclude Area Raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _exclude_raster { get; set; } = null;


        /// <summary>
        /// <para>Stretch Type</para>
        /// <para><xdoc>
        ///   <para>Stretch the range of values before color balancing. Choose from one of the following options:</para>
        ///   <bulletList>
        ///     <bullet_item>None— Use the original pixel values. This is the default.</bullet_item><para/>
        ///     <bullet_item>Adaptive— An adaptive prestretch will be applied before any processing takes place.</bullet_item><para/>
        ///     <bullet_item>Minimum Maximum— Stretch the values between their actual minimum and maximum values.</bullet_item><para/>
        ///     <bullet_item>Standard deviation— Stretch the values between the default number of standard deviations.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>在颜色平衡之前拉伸值范围。从以下选项之一中进行选择：</para>
        ///   <bulletList>
        ///     <bullet_item>None— 使用原始像素值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>自适应 — 在进行任何处理之前，将应用自适应预拉伸。</bullet_item><para/>
        ///     <bullet_item>最小最大值 （Minimum Maximum） - 在其实际最小值和最大值之间拉伸值。</bullet_item><para/>
        ///     <bullet_item>标准差 - 在默认标准差数之间拉伸值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Stretch Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _stretch_type_value _stretch_type { get; set; } = _stretch_type_value._NONE;

        public enum _stretch_type_value
        {
            /// <summary>
            /// <para>None</para>
            /// <para>None— Use the original pixel values. This is the default.</para>
            /// <para>None— 使用原始像素值。这是默认设置。</para>
            /// </summary>
            [Description("None")]
            [GPEnumValue("NONE")]
            _NONE,

            /// <summary>
            /// <para>Standard deviation</para>
            /// <para>Standard deviation— Stretch the values between the default number of standard deviations.</para>
            /// <para>标准差 - 在默认标准差数之间拉伸值。</para>
            /// </summary>
            [Description("Standard deviation")]
            [GPEnumValue("STANDARD_DEVIATION")]
            _STANDARD_DEVIATION,

            /// <summary>
            /// <para>Minimum Maximum</para>
            /// <para>Minimum Maximum— Stretch the values between their actual minimum and maximum values.</para>
            /// <para>最小最大值 （Minimum Maximum） - 在其实际最小值和最大值之间拉伸值。</para>
            /// </summary>
            [Description("Minimum Maximum")]
            [GPEnumValue("MINIMUM_MAXIMUM")]
            _MINIMUM_MAXIMUM,

            /// <summary>
            /// <para>Adaptive</para>
            /// <para>Adaptive— An adaptive prestretch will be applied before any processing takes place.</para>
            /// <para>自适应 — 在进行任何处理之前，将应用自适应预拉伸。</para>
            /// </summary>
            [Description("Adaptive")]
            [GPEnumValue("ADAPTIVE")]
            _ADAPTIVE,

        }

        /// <summary>
        /// <para>Gamma</para>
        /// <para>Adjust the overall brightness of an image. A low value will minimize the contrast between moderate values by making them appear darker. Higher values increase the contrast by making them appear brighter.</para>
        /// <para>调整图像的整体亮度。较低的值将使中等值看起来更暗，从而最大限度地减少它们之间的对比度。较高的值通过使它们看起来更亮来增加对比度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Gamma")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _gamma { get; set; } = 1;


        /// <summary>
        /// <para>Block Field</para>
        /// <para>The name of the field in a mosaic dataset's attribute table used to identify items that should be considered one item when performing some calculations and operations.</para>
        /// <para>镶嵌数据集属性表中字段的名称，用于标识在执行某些计算和操作时应视为一个项目的项目。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Block Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _block_field { get; set; } = null;


        /// <summary>
        /// <para>Updated Mosaic Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Mosaic Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_mosaic_dataset { get; set; }


        public ColorBalanceMosaicDataset SetEnv(object parallelProcessingFactor = null)
        {
            base.SetEnv(parallelProcessingFactor: parallelProcessingFactor);
            return this;
        }

    }

}